; Title: Alfathrom Core Library x86
; Coded by Riyan Widiyanto

.386
.model flat, stdcall
option casemap: none

include Include.inc

include Data.asm
include Exported.asm

.code
	InitDLL proc
		invoke ARGetFileSizeByHandleW, g_hDllInstance
		ret
	InitDLL endp

	ResetError proc
		invoke SetLastError, 0h
		ret
	ResetError endp

	DllMain proc hInstance: DWORD, dwReason: DWORD, lpReserved: DWORD
		assume fs: nothing
		mov eax, dword ptr ss:[ebp+8h]
		mov g_hDllInstance, eax
		;call InitDLL
		mov eax, 1h
		jmp @RET
		mov eax, dword ptr fs:[18h]
		mov eax, dword ptr ds:[eax+30h]
		movzx eax, byte ptr ss:[eax+2h]
		xor eax, dword ptr ss:[ebp+0Ch]
@RET:
		ret
	DllMain endp
end DllMain
